<?php
define('BEVIN', TRUE);
if(strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) != 'xmlhttprequest') {
	exit("0");
}

include_once("include/common.inc.php");

$uid = $user->checkUserLogin();
if(!$uid) {
	exit("0");
}

$k = $_GET['k'];
if($k) {
	$cardlist = $card->getCardListByKey($k);
	if($cardlist) {
		echo json_encode($cardlist);
		exit;
	}
} else {
	$cardlist = $card->getCardList();
	echo json_encode($cardlist);
	exit;
}
echo "0";
?>